<?php 
include '../functions.php';
//p($_SERVER);
if($_SERVER['REQUEST_METHOD'] == 'POST'){
	echo '是post请求<br/>';
	define('IS_POST',true);
}else{
	echo '是get请求<br/>';
	define('IS_POST',false);
}

//如果是POST提交
if(IS_POST){
	$uname = $_POST['uname'];
	echo $uname;
}

 ?>
 <!doctype html>
 <html lang="en">
 <head>
 	<meta charset="UTF-8" />
 	<title>Document</title>
 </head>
 <body>
 	<form action="" method="post">
 		用户名： 
 		<input type="text" name="uname" id="" />
 		<input type="submit" value="提交"/>
 	</form>
 </body>
 </html>







